<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">

<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标签</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/animate.css">
    <link rel="stylesheet" href="../static/css/me.css">

</head>
<style th:inline="css">
    body {
        background-image: url('http://p5.qhimg.com/bdr/__85/t0164ff9a74a9ba5334.jpg') !important;
        background-size: 100% 800px !important;
        background-attachment: fixed !important;
        background-repeat: no-repeat !important;
    }
</style>
<body>
<!--导航-->
<nav th:replace="_fragments :: menu(3)"></nav>


<!--中间内容-->
<div class="m-padded-tb-max m-container animate__animated animate__fadeInUp">
    <!--标签栏-->
    <div class="ui center aligned segment m-shadow-small">
        <h1 class="ui m-font-kt"><i class="ui tags icon"></i>标签</h1>
        <div class="ui divider"></div>
        <a th:each="tag : ${tags}" style="margin: 10px !important;" href="#" th:href="@{/tags/{id}(id=${tag.id})}"
           th:classappend="${tag.id==activeTagId} ? 'active' : ''" class="ui inverted secondary button">
            <span th:text="${tag.name}">JAVA</span> <span th:text="${#arrays.length(tag.blogs)}">22</span>
        </a>
    </div>
    <!--文章栏-->
    <div class="ui grey segment">
        <div class="padded vertical segment m-padded-tb-large" th:each="blog : ${page.content}">
            <div class="ui mobile reversed stackable grid">
                <div class="ten wide column">
                    <h3 class="ui header">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" class="m-black"
                           target="_blank" th:text="${blog.title}">和我一起去旅游怎么样？
                        </a>
                    </h3>
                    <p class="m-text" th:text="|${blog.description}......|">
                        如果问世间上还有真正的“香格里拉”吗？那么这个地方一定是不丹王国！这是一块心灵的福地，是崇尚高雅与纯洁的精神乐园，因为这里有经幡、有寺庙、有僧侣；不丹就像一个不食人间烟火的孩子，纯净清澈，质朴天然，有信仰，有自由......</p>
                    <div class="ui middle aligned grid">
                        <div class="twelve wide column">
                            <div class="ui mini horizontal link list">
                                <div class="item">
                                    <img src="https://picsum.photos/id/1026/100/100" alt="" th:src="@{${blog.user.avatar}}" class="ui avatar image">
                                    <div class="content"><a class="header m-text-t1 m-black" th:text="${blog.user.nickname}">颜云华</a></div>
                                </div>
                                <div class="item">
                                    <span><i class="clock outline icon"></i></span>
                                    <span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020-02-01</span>
                                </div>
                                <div class="item">
                                    <span><i class="comment alternate outline icon"></i></span>
                                    <span th:text="${blog.commentCount}">12</span>
                                </div>
                                <div class="item">
                                    <span><i class="eye icon"></i></span>
                                    <span th:text="${blog.views}">222</span>
                                </div>
                            </div>
                        </div>
                        <div class="right aligned four wide column">
                            <a href="#" target="_blank" th:href="@{/types/{id}(id=${blog.type.id})}" class="ui grey basic label">
                                <span><i class="folder outline icon"></i></span>
                                <span th:text="${blog.type.name}">旅行日记</span>
                            </a>
                        </div>
                        <div class="row">
                            <div class="column">
                                <div class="ui tag labels">
                                    <a href="#" th:each="tag : ${blog.tags}" th:href="@{/tags/{id}(id=${tag.id})}"
                                       class="ui label m-text-thin"
                                       th:classappend="${tag.id==activeTagId} ? 'grey'"
                                       th:text="${tag.name}">Diary</a>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="middle aligned six wide column">
                    <a href="#" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}">
                        <img src="https://picsum.photos/id/1015/650/350" th:src="@{${blog.firstPicture}}"
                             alt="" class="ui rounded image">
                    </a>
                </div>
            </div>
        </div>
    </div>
    <!--底部分页-->
    <br>
    <div style="text-align: center" th:if="${page.totalPages}>1">
        <a href="#" th:href="@{'/tags/'+${activeTagId}(page=${page.number}-1)}"
           class="ui large inverted circular icon button" th:unless="${page.first}">
            <i class="left orange chevron icon"></i></a>
        &nbsp;&nbsp;&nbsp;
        <a href="#" th:href="@{'/tags/'+${activeTagId}(page=${page.number}+1)}"
           class="ui large inverted circular icon button" th:unless="${page.last}">
            <i class="right orange chevron icon"></i></a>
    </div>
</div>

<!--底部footer-->
<footer th:replace="_fragments :: footer"></footer>


<!--/*/<th:block th:replace="_fragments :: script">/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<!--------板娘模板-------->
<script src="https://cdn.jsdelivr.net/gh/Fog-Forest/live2d@1.0.2/live2d_load/autoload.js"></script>
<!--/*/</th:block>/*/-->


<!--导航的手机端按钮的响应页面-->
<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide')
    })
    ;
</script>


</body>
</html>